{% extends 'base.html' %}

{% block title %} {{ sprint.name.value }} {% endblock %}

{% block include %} {{ sprint.media }} {% endblock %}

{% block content %}

<h3> 
	{% if editable %}
		Edit 
	{% elif deletable %}
		Delete
	{% else %}
		View 
	{% endif %}
	Sprint: {{ sprint.name.value }}
</h3>

{% if editable %}
	<form method='post'> {% csrf_token %}
{% elif deletable %}
	<form method='post'> {% csrf_token %}
{% else %}
	<form>
{% endif %}

<fieldset name="sprint">
{{ sprint.as_p }}
</fieldset>

{% if editable %}
	<input type='submit' value='Save'>	
	</form>
	<form action='/sprints/' method="get">
    <input type="submit" value="Back" />
    </form>
{% elif deletable %}
	<input type='submit' value='Delete'>
	<form action='/sprints/' method="get">
    <input type="submit" value="Back" />
    </form>

{% else %}
	</form>
	
	<form action='/sprint/edit/{{ id }}/' method="get">
    	<input type="submit" value="Edit" />
    </form>
	<form action='/sprints/' method="get">
    	<input type="submit" value="Back" />
	</form>		
	
{% endif %}

{% endblock %}